import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/', component: () => import('@/views/index.vue'),
      redirect: '/categoryPage',
      children: [
        {
          path: 'categoryPage', component: () => import('@/views/category/categoryPage.vue'),
        },
        {
          path:'libraryPage', component: () => import('@/views/category/libraryPage.vue'),
        },
        {
          path: 'libraryPage/:id?', // :id? 表示 id 是可选的
          component: () => import('@/views/category/libraryPage.vue'),
        },
        {
          path:'appIntroduction', component: () => import('@/views/category/AppIntroduction.vue'),
        },
        {
          path:'appIntroduction/:id?', component: () => import('@/views/category/AppIntroduction.vue'),
        },
        {
          path:'deepSeek',component: () => import("@/views/DeepSeek/deepSeek.vue"),
        }

      ],

    }
  ],
})

export default router
